package com.hkjtgc.pcr_app.util

import android.content.Context
import java.util.*

@Suppress("DEPRECATION")
internal object  CommonUtil {

    fun  configLanguage (mContext: Context, language: String) {
        val config = mContext.resources.configuration
        when (language) {
            "CHINESE" -> {
                config.locale = Locale.SIMPLIFIED_CHINESE
            }
            "ENGLISH" -> {
                config.locale = Locale.US
            }
            "JAPANESE" -> {
                config.locale = Locale.JAPAN
            }
        }
        mContext.resources.updateConfiguration(config,null)
    }

}